package com.example.demo.model;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class BookBorrowExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public BookBorrowExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andBooknameEqualTo(String value) {
            addCriterion("temp.bookname =", value, "bookname");
            return (Criteria) this;
        }

        public Criteria andBookborrowIdIsNull() {
            addCriterion("bookborrow_id is null");
            return (Criteria) this;
        }

        public Criteria andBookborrowIdIsNotNull() {
            addCriterion("bookborrow_id is not null");
            return (Criteria) this;
        }

        public Criteria andBookborrowIdEqualTo(Integer value) {
            addCriterion("bookborrow_id =", value, "bookborrowId");
            return (Criteria) this;
        }

        public Criteria andBookborrowIdNotEqualTo(Integer value) {
            addCriterion("bookborrow_id <>", value, "bookborrowId");
            return (Criteria) this;
        }

        public Criteria andBookborrowIdGreaterThan(Integer value) {
            addCriterion("bookborrow_id >", value, "bookborrowId");
            return (Criteria) this;
        }

        public Criteria andBookborrowIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("bookborrow_id >=", value, "bookborrowId");
            return (Criteria) this;
        }

        public Criteria andBookborrowIdLessThan(Integer value) {
            addCriterion("bookborrow_id <", value, "bookborrowId");
            return (Criteria) this;
        }

        public Criteria andBookborrowIdLessThanOrEqualTo(Integer value) {
            addCriterion("bookborrow_id <=", value, "bookborrowId");
            return (Criteria) this;
        }

        public Criteria andBookborrowIdIn(List<Integer> values) {
            addCriterion("bookborrow_id in", values, "bookborrowId");
            return (Criteria) this;
        }

        public Criteria andBookborrowIdNotIn(List<Integer> values) {
            addCriterion("bookborrow_id not in", values, "bookborrowId");
            return (Criteria) this;
        }

        public Criteria andBookborrowIdBetween(Integer value1, Integer value2) {
            addCriterion("bookborrow_id between", value1, value2, "bookborrowId");
            return (Criteria) this;
        }

        public Criteria andBookborrowIdNotBetween(Integer value1, Integer value2) {
            addCriterion("bookborrow_id not between", value1, value2, "bookborrowId");
            return (Criteria) this;
        }

        public Criteria andUserIdIsNull() {
            addCriterion("user_id is null");
            return (Criteria) this;
        }

        public Criteria andUserIdIsNotNull() {
            addCriterion("user_id is not null");
            return (Criteria) this;
        }

        public Criteria andUserIdEqualTo(Integer value) {
            addCriterion("user_id =", value, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdNotEqualTo(Integer value) {
            addCriterion("user_id <>", value, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdGreaterThan(Integer value) {
            addCriterion("user_id >", value, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("user_id >=", value, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdLessThan(Integer value) {
            addCriterion("user_id <", value, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdLessThanOrEqualTo(Integer value) {
            addCriterion("user_id <=", value, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdIn(List<Integer> values) {
            addCriterion("user_id in", values, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdNotIn(List<Integer> values) {
            addCriterion("user_id not in", values, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdBetween(Integer value1, Integer value2) {
            addCriterion("user_id between", value1, value2, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdNotBetween(Integer value1, Integer value2) {
            addCriterion("user_id not between", value1, value2, "userId");
            return (Criteria) this;
        }

        public Criteria andBookinfoIdIsNull() {
            addCriterion("bookinfo_id is null");
            return (Criteria) this;
        }

        public Criteria andBookinfoIdIsNotNull() {
            addCriterion("bookinfo_id is not null");
            return (Criteria) this;
        }

        public Criteria andBookinfoIdEqualTo(Integer value) {
            addCriterion("bookinfo_id =", value, "bookinfoId");
            return (Criteria) this;
        }

        public Criteria andBookinfoIdNotEqualTo(Integer value) {
            addCriterion("bookinfo_id <>", value, "bookinfoId");
            return (Criteria) this;
        }

        public Criteria andBookinfoIdGreaterThan(Integer value) {
            addCriterion("bookinfo_id >", value, "bookinfoId");
            return (Criteria) this;
        }

        public Criteria andBookinfoIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("bookinfo_id >=", value, "bookinfoId");
            return (Criteria) this;
        }

        public Criteria andBookinfoIdLessThan(Integer value) {
            addCriterion("bookinfo_id <", value, "bookinfoId");
            return (Criteria) this;
        }

        public Criteria andBookinfoIdLessThanOrEqualTo(Integer value) {
            addCriterion("bookinfo_id <=", value, "bookinfoId");
            return (Criteria) this;
        }

        public Criteria andBookinfoIdIn(List<Integer> values) {
            addCriterion("bookinfo_id in", values, "bookinfoId");
            return (Criteria) this;
        }

        public Criteria andBookinfoIdNotIn(List<Integer> values) {
            addCriterion("bookinfo_id not in", values, "bookinfoId");
            return (Criteria) this;
        }

        public Criteria andBookinfoIdBetween(Integer value1, Integer value2) {
            addCriterion("bookinfo_id between", value1, value2, "bookinfoId");
            return (Criteria) this;
        }

        public Criteria andBookinfoIdNotBetween(Integer value1, Integer value2) {
            addCriterion("bookinfo_id not between", value1, value2, "bookinfoId");
            return (Criteria) this;
        }

        public Criteria andTimeBorrrowIsNull() {
            addCriterion("time_borrrow is null");
            return (Criteria) this;
        }

        public Criteria andTimeBorrrowIsNotNull() {
            addCriterion("time_borrrow is not null");
            return (Criteria) this;
        }

        public Criteria andTimeBorrrowEqualTo(Date value) {
            addCriterion("time_borrrow =", value, "timeBorrrow");
            return (Criteria) this;
        }

        public Criteria andTimeBorrrowNotEqualTo(Date value) {
            addCriterion("time_borrrow <>", value, "timeBorrrow");
            return (Criteria) this;
        }

        public Criteria andTimeBorrrowGreaterThan(Date value) {
            addCriterion("time_borrrow >", value, "timeBorrrow");
            return (Criteria) this;
        }

        public Criteria andTimeBorrrowGreaterThanOrEqualTo(Date value) {
            addCriterion("time_borrrow >=", value, "timeBorrrow");
            return (Criteria) this;
        }

        public Criteria andTimeBorrrowLessThan(Date value) {
            addCriterion("time_borrrow <", value, "timeBorrrow");
            return (Criteria) this;
        }

        public Criteria andTimeBorrrowLessThanOrEqualTo(Date value) {
            addCriterion("time_borrrow <=", value, "timeBorrrow");
            return (Criteria) this;
        }

        public Criteria andTimeBorrrowIn(List<Date> values) {
            addCriterion("time_borrrow in", values, "timeBorrrow");
            return (Criteria) this;
        }

        public Criteria andTimeBorrrowNotIn(List<Date> values) {
            addCriterion("time_borrrow not in", values, "timeBorrrow");
            return (Criteria) this;
        }

        public Criteria andTimeBorrrowBetween(Date value1, Date value2) {
            addCriterion("time_borrrow between", value1, value2, "timeBorrrow");
            return (Criteria) this;
        }

        public Criteria andTimeBorrrowNotBetween(Date value1, Date value2) {
            addCriterion("time_borrrow not between", value1, value2, "timeBorrrow");
            return (Criteria) this;
        }

        public Criteria andTimeNeedBackIsNull() {
            addCriterion("time_need_back is null");
            return (Criteria) this;
        }

        public Criteria andTimeNeedBackIsNotNull() {
            addCriterion("time_need_back is not null");
            return (Criteria) this;
        }

        public Criteria andTimeNeedBackEqualTo(Date value) {
            addCriterion("time_need_back =", value, "timeNeedBack");
            return (Criteria) this;
        }

        public Criteria andTimeNeedBackNotEqualTo(Date value) {
            addCriterion("time_need_back <>", value, "timeNeedBack");
            return (Criteria) this;
        }

        public Criteria andTimeNeedBackGreaterThan(Date value) {
            addCriterion("time_need_back >", value, "timeNeedBack");
            return (Criteria) this;
        }

        public Criteria andTimeNeedBackGreaterThanOrEqualTo(Date value) {
            addCriterion("time_need_back >=", value, "timeNeedBack");
            return (Criteria) this;
        }

        public Criteria andTimeNeedBackLessThan(Date value) {
            addCriterion("time_need_back <", value, "timeNeedBack");
            return (Criteria) this;
        }

        public Criteria andTimeNeedBackLessThanOrEqualTo(Date value) {
            addCriterion("time_need_back <=", value, "timeNeedBack");
            return (Criteria) this;
        }

        public Criteria andTimeNeedBackIn(List<Date> values) {
            addCriterion("time_need_back in", values, "timeNeedBack");
            return (Criteria) this;
        }

        public Criteria andTimeNeedBackNotIn(List<Date> values) {
            addCriterion("time_need_back not in", values, "timeNeedBack");
            return (Criteria) this;
        }

        public Criteria andTimeNeedBackBetween(Date value1, Date value2) {
            addCriterion("time_need_back between", value1, value2, "timeNeedBack");
            return (Criteria) this;
        }

        public Criteria andTimeNeedBackNotBetween(Date value1, Date value2) {
            addCriterion("time_need_back not between", value1, value2, "timeNeedBack");
            return (Criteria) this;
        }

        public Criteria andIfBackIsNull() {
            addCriterion("if_back is null");
            return (Criteria) this;
        }

        public Criteria andIfBackIsNotNull() {
            addCriterion("if_back is not null");
            return (Criteria) this;
        }

        public Criteria andIfBackEqualTo(Integer value) {
            addCriterion("if_back =", value, "ifBack");
            return (Criteria) this;
        }

        public Criteria andIfBackNotEqualTo(Integer value) {
            addCriterion("if_back <>", value, "ifBack");
            return (Criteria) this;
        }

        public Criteria andIfBackGreaterThan(Integer value) {
            addCriterion("if_back >", value, "ifBack");
            return (Criteria) this;
        }

        public Criteria andIfBackGreaterThanOrEqualTo(Integer value) {
            addCriterion("if_back >=", value, "ifBack");
            return (Criteria) this;
        }

        public Criteria andIfBackLessThan(Integer value) {
            addCriterion("if_back <", value, "ifBack");
            return (Criteria) this;
        }

        public Criteria andIfBackLessThanOrEqualTo(Integer value) {
            addCriterion("if_back <=", value, "ifBack");
            return (Criteria) this;
        }

        public Criteria andIfBackIn(List<Integer> values) {
            addCriterion("if_back in", values, "ifBack");
            return (Criteria) this;
        }

        public Criteria andIfBackNotIn(List<Integer> values) {
            addCriterion("if_back not in", values, "ifBack");
            return (Criteria) this;
        }

        public Criteria andIfBackBetween(Integer value1, Integer value2) {
            addCriterion("if_back between", value1, value2, "ifBack");
            return (Criteria) this;
        }

        public Criteria andIfBackNotBetween(Integer value1, Integer value2) {
            addCriterion("if_back not between", value1, value2, "ifBack");
            return (Criteria) this;
        }

        public Criteria andRenewCntIsNull() {
            addCriterion("renew_cnt is null");
            return (Criteria) this;
        }

        public Criteria andRenewCntIsNotNull() {
            addCriterion("renew_cnt is not null");
            return (Criteria) this;
        }

        public Criteria andRenewCntEqualTo(Integer value) {
            addCriterion("renew_cnt =", value, "renewCnt");
            return (Criteria) this;
        }

        public Criteria andRenewCntNotEqualTo(Integer value) {
            addCriterion("renew_cnt <>", value, "renewCnt");
            return (Criteria) this;
        }

        public Criteria andRenewCntGreaterThan(Integer value) {
            addCriterion("renew_cnt >", value, "renewCnt");
            return (Criteria) this;
        }

        public Criteria andRenewCntGreaterThanOrEqualTo(Integer value) {
            addCriterion("renew_cnt >=", value, "renewCnt");
            return (Criteria) this;
        }

        public Criteria andRenewCntLessThan(Integer value) {
            addCriterion("renew_cnt <", value, "renewCnt");
            return (Criteria) this;
        }

        public Criteria andRenewCntLessThanOrEqualTo(Integer value) {
            addCriterion("renew_cnt <=", value, "renewCnt");
            return (Criteria) this;
        }

        public Criteria andRenewCntIn(List<Integer> values) {
            addCriterion("renew_cnt in", values, "renewCnt");
            return (Criteria) this;
        }

        public Criteria andRenewCntNotIn(List<Integer> values) {
            addCriterion("renew_cnt not in", values, "renewCnt");
            return (Criteria) this;
        }

        public Criteria andRenewCntBetween(Integer value1, Integer value2) {
            addCriterion("renew_cnt between", value1, value2, "renewCnt");
            return (Criteria) this;
        }

        public Criteria andRenewCntNotBetween(Integer value1, Integer value2) {
            addCriterion("renew_cnt not between", value1, value2, "renewCnt");
            return (Criteria) this;
        }

        public Criteria andTimeBackIsNull() {
            addCriterion("time_back is null");
            return (Criteria) this;
        }

        public Criteria andTimeBackIsNotNull() {
            addCriterion("time_back is not null");
            return (Criteria) this;
        }

        public Criteria andTimeBackEqualTo(Date value) {
            addCriterion("time_back =", value, "timeBack");
            return (Criteria) this;
        }

        public Criteria andTimeBackNotEqualTo(Date value) {
            addCriterion("time_back <>", value, "timeBack");
            return (Criteria) this;
        }

        public Criteria andTimeBackGreaterThan(Date value) {
            addCriterion("time_back >", value, "timeBack");
            return (Criteria) this;
        }

        public Criteria andTimeBackGreaterThanOrEqualTo(Date value) {
            addCriterion("time_back >=", value, "timeBack");
            return (Criteria) this;
        }

        public Criteria andTimeBackLessThan(Date value) {
            addCriterion("time_back <", value, "timeBack");
            return (Criteria) this;
        }

        public Criteria andTimeBackLessThanOrEqualTo(Date value) {
            addCriterion("time_back <=", value, "timeBack");
            return (Criteria) this;
        }

        public Criteria andTimeBackIn(List<Date> values) {
            addCriterion("time_back in", values, "timeBack");
            return (Criteria) this;
        }

        public Criteria andTimeBackNotIn(List<Date> values) {
            addCriterion("time_back not in", values, "timeBack");
            return (Criteria) this;
        }

        public Criteria andTimeBackBetween(Date value1, Date value2) {
            addCriterion("time_back between", value1, value2, "timeBack");
            return (Criteria) this;
        }

        public Criteria andTimeBackNotBetween(Date value1, Date value2) {
            addCriterion("time_back not between", value1, value2, "timeBack");
            return (Criteria) this;
        }

        public Criteria andDeleteFlagIsNull() {
            addCriterion("delete_flag is null");
            return (Criteria) this;
        }

        public Criteria andDeleteFlagIsNotNull() {
            addCriterion("delete_flag is not null");
            return (Criteria) this;
        }

        public Criteria andDeleteFlagEqualTo(String value) {
            addCriterion("delete_flag =", value, "deleteFlag");
            return (Criteria) this;
        }

        public Criteria andDeleteFlagNotEqualTo(String value) {
            addCriterion("delete_flag <>", value, "deleteFlag");
            return (Criteria) this;
        }

        public Criteria andDeleteFlagGreaterThan(String value) {
            addCriterion("delete_flag >", value, "deleteFlag");
            return (Criteria) this;
        }

        public Criteria andDeleteFlagGreaterThanOrEqualTo(String value) {
            addCriterion("delete_flag >=", value, "deleteFlag");
            return (Criteria) this;
        }

        public Criteria andDeleteFlagLessThan(String value) {
            addCriterion("delete_flag <", value, "deleteFlag");
            return (Criteria) this;
        }

        public Criteria andDeleteFlagLessThanOrEqualTo(String value) {
            addCriterion("delete_flag <=", value, "deleteFlag");
            return (Criteria) this;
        }

        public Criteria andDeleteFlagLike(String value) {
            addCriterion("delete_flag like", value, "deleteFlag");
            return (Criteria) this;
        }

        public Criteria andDeleteFlagNotLike(String value) {
            addCriterion("delete_flag not like", value, "deleteFlag");
            return (Criteria) this;
        }

        public Criteria andDeleteFlagIn(List<String> values) {
            addCriterion("delete_flag in", values, "deleteFlag");
            return (Criteria) this;
        }

        public Criteria andDeleteFlagNotIn(List<String> values) {
            addCriterion("delete_flag not in", values, "deleteFlag");
            return (Criteria) this;
        }

        public Criteria andDeleteFlagBetween(String value1, String value2) {
            addCriterion("delete_flag between", value1, value2, "deleteFlag");
            return (Criteria) this;
        }

        public Criteria andDeleteFlagNotBetween(String value1, String value2) {
            addCriterion("delete_flag not between", value1, value2, "deleteFlag");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}